<?php

use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class CreateEvaluateResultTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('evaluate_results', function (Blueprint $table) {
            $table->increments('id');
            $table->integer('evaluate_id');
            $table->integer('question_id');
            $table->string('question_snapshot')->comment('评价项内容快照');
            $table->integer('score')->comment('得分')->default(0);
            $table->integer('full_score')->comment('评价项总分');
            $table->integer('target_id')->comment('教研课程的id');
            $table->integer('creator_id')->comment('评价者id');
            $table->integer('teacher_id')->comment('被评价的老师id');
            $table->timestamps();
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('evaluate_results');
    }
}
